﻿#pragma once

#include <sqlpp11/sqlpp11.h>
#include <sqlpp11/sqlite3/sqlite3.h>
#include "sqlpp11orm.h"

#include "OCMain/Environment.h"
#include "OCMain/Log.h"
#include "OCMain/Timer.h"
#include "OCMain/FileUtil.h"
#include "OCMain/Date.h"
#include "OCMain/DataStream.h"
#include "OCServer/ServerUtil.h"
#include "OCServer/SqliteFileManager.h"
#include "FDBFile.h"
#include "drogon/drogon.h"

using namespace OCPP;

void PackSqlite()
{
	OCPP_LOG_INFO << "PackSqlite\n";
	String folder = "G:/MapCacherMiss/terrarium";
	String savePath = "H:/";
	String name = folder.substr(folder.find_last_of("/") + 1, folder.length());
	String fileName = joinPath(savePath, name + ".sqlite");
	SqliteFileManager mgr;
	mgr.setRemoveAfterInser(false);
	mgr.create(fileName);
	mgr.packDir(folder);
}
